<!DOCTYPE html>
<html>
	<head>
		<meta name="viewport" content="initial-scale=1.0,user-scalable=no"/>
		<meta charset="UTF-8">
		<title>鲜店</title>
		<link href="/css/bootstrap.min.css" rel="stylesheet">
		<link href="/css/weixin54.css" rel="stylesheet">
		<link href="/css/yang3.css" rel="stylesheet">
		<script src="/js/jquery.min.js"></script>
		<script src="/js/bootstrap.min.js"></script>
		<script src="/js/weixin69.js"></script>
		<script src="/js/scrollbar.js"></script>
		<script src="/js/jsAddress.js"></script>
		<!--微信js-->
		<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
		<script type="text/javascript">
			document.addEventListener('touchmove', function (e) {e.preventDefault(); }, false);
		</script>
	</head>
	<body class="layout_body"  style="overflow:hidden;">
		<div class="layout_content">
			<?php echo $this->layout()->content; ?>
			<?php 
				$signPackage = new Application_Model_GetSignPackage();
				$shareParam = $signPackage->getSignPackage();
				$request = Zend_Controller_Front::getInstance()->getRequest();
				$controller = $request->getControllerName();
				$action = $request->getActionName();
				if(($controller=='presalesku' && $action =='details') || ($controller!=='share' && $action=='index')){
					
				}else{
			?>
			<script type="text/javascript">
				var title = '鲜店，新鲜菜，放心肉！';
				var desc = '我已在鲜店下单，还得了现金返现，亲你也来试试吧！';
				var link = 'http://shop.renrencaichang.com?tab=presale';
				var imgurl = 'http://shop.renrencaichang.com/images/hb_logo4.jpg';
				 wx.config({
					debug: false,
					appId:      '<?php echo $shareParam["appId"];?>',
					timestamp:  '<?php echo $shareParam["timestamp"];?>',
					nonceStr:   '<?php echo $shareParam["nonceStr"];?>',
					signature:  '<?php echo $shareParam["signature"];?>',
					jsApiList: [
						'checkJsApi',
						'onMenuShareTimeline',
						'onMenuShareAppMessage',
						'onMenuShareQQ',
						'onMenuShareWeibo'
					]
				});
				 wx.ready(function () {
					wx.onMenuShareTimeline({//分享朋友圈
						title: title,
						desc: desc,
						link: link,
						imgUrl: imgurl,
						trigger: function (res) {
						},
						success: function (res) {
							alert('分享成功');
						},
						cancel: function (res) {
							alert('已取消');
						},
						fail: function (res) {
							alert('wx.onMenuShareTimeline:fail: '+JSON.stringify(res));
						}
					});
					wx.onMenuShareAppMessage({//分享给朋友
						title: title,
						desc: desc,
						link: link,
						imgUrl: imgurl,
						trigger: function (res) {
						},
						success: function (res) {	
							alert('分享成功');
						},
						cancel: function (res) {
							alert('已取消');
						},
						fail: function (res) {
							alert('wx.onMenuShareAppMessage:fail: '+JSON.stringify(res));
						}
					});
			});
			</script>
			<?php } ?>
		</div>
	</body>
</html>